<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="在线用户" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
</head>
<script language="javascript">
	function doOut(id,type){
		window.location="/system/OnlineOut.ihtm?id="+id+"&type="+type;
	}
</script>
<body oncontextmenu="return false" class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:460px;text-align:left;margin:auto;">
  <div class="sheet-top">
    <div class="content">
      <h2>在线用户</h2>
      <p>当前正在使用系统的用户</p>
    </div>
  </div>
  <div class="sheet-list">
    <div class="search-business">
    	<div class="cue-info">
    		<span>在线人数（${fn:length(onlineList)+fn:length(appList)}）：${fn:length(onlineList)}位（电脑浏览器） ${fn:length(appList)}位（手机APP）</span>
    	</div>
	     <div class="table-list">
	        <table width="100%">
	          <tr>
					<th width="150">姓名</th>
					<th>部门</th>
					<th width="100">使用方式</th>
					<c:if test="${currentUser.user.userType==1}">
						<th width="100">操作</th>
					</c:if>
				</tr>
				<c:forEach var="item" items="${onlineList}">
				<tr>
					<td>${item.staffer.stafferName}</td>
					<td>${item.depName}</td>
					<td><img src="/images/pc.gif"></td>
					<c:if test="${currentUser.user.userType==1}">
						<td><a href="javascript:doOut('${item.user.id}','PC');">强制下线</a></td>
					</c:if>
				</tr>
				</c:forEach>
				<c:forEach var="item" items="${appList}">
				<tr>
					<td>${item.staffer.stafferName}</td>
					<td>${item.depName}</td>
					<td><img src="/images/ico-sms.gif"></td>
					<c:if test="${currentUser.user.userType==1}">
						<td><a href="javascript:doOut('${item.user.id}','APP');">强制下线</a></td>
					</c:if>
				</tr>
				</c:forEach>
			</table>
	     </div>  
	   </div>  
  </div>
</div>
</body>
</html>